<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <link rel="stylesheet" href="css/bootstrap.css">
        <style>
            body {
                padding-top: 60px;
                padding-bottom: 40px;
            }
        </style>
        <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
        <link rel="stylesheet" href="css/main.css">
        <link rel="stylesheet" href="css/smoothness/jquery-ui-1.8.20.custom.css">
        <link rel="stylesheet" href="css/jquery.ui.timepicker.css">

        <script src="js/vendor/modernizr-2.6.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>

        <script type="text/javascript">
            function countProperties(obj) {
                var prop;
                var propCount = 0;

                for (prop in obj) {
                    propCount++;
                }
                return propCount;
            }
            $(document).ready(function(){
                
                if(window.location.hash)
                {
                    var hashvalue=window.location.hash;
                   // alert(hashvalue);
                    if(hashvalue=="#addevent")
                    {
                        $("#contents").load("add-event.jsp");
                    }
                    else if(hashvalue=="#addpackage")
                    {
                        $("#contents").load("add-package.jsp #addpackagesection");
                        $.post("PackageAddonDisplayServlet",function(data){
                            // this add all the addons to the addon selector
                            var result=$.parseJSON(data);//this converts string to json
                            //alert("result"+result);
                            var count=countProperties(result);// this gives the count of the no of active events.
                            //alert("Count : "+count);
                            var output="<select multiple=\"multiple\" name=\"facilities\">";
                            for(var i=0;i<count;i++)
                            {
                                output+="<option value=\""+result[i].AddonId+"\">"+result[i].AddonName+"</option>";
                            }
                            output+="</select>";
                        
                            $("#addpackageselectaddons").html(output);
                        });
                        $.post("PackageRoomtypeDisplay",function(data){
                        
                            var result=$.parseJSON(data);//this converts string to json
                            // var result=data;
                            //alert ("result : "+result);
                            var count=countProperties(result);// this gives the count of the no of active events.
                            //alert("Count : "+count);
                            
                            var output="<select name=\"Roomtype\" id=\"Roomtype\" class=\"input-large margin-r-20\">";
                            for(var i=0;i<count;i++)
                            {
                                output+="<option value=\""+result[i].roomtypeid+"\">"+result[i].roomtype+"</option>";
                            }
                            output+="</select>";
                            //alert("output"+output);
                            $("#addpackagesroomtypeselection").html(output);
                            var output1="<select name=\"Roomtype1\" id=\"Roomtype1\" class=\"input-large margin-r-20\">";
                            for(var i=0;i<count;i++)
                            {
                                output1+="<option value=\""+result[i].roomtypeid+"\">"+result[i].roomtype+"</option>";
                            }
                            output1+="</select>";
                            $("#addpackagesroomtypeselection1").html(output1);
                        });
                    }else if(hashvalue=="#viewevent")
                    {
                        $("#contents").load("view-events.jsp");
                        $.post("../ViewEventServlet",function(data){
                           // alert("Data Got : " + data);
                            var result=$.parseJSON(data);//this converts string to json
                        
                            var count=countProperties(result);// this gives the count of the no of active events.
                            
                        
                            var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                            output=output+"<thead><tr><th>Name</th><th>Date</th><th>Time</th><th>Venue</th><th>Description</th><th>Edit</th><th>Delete</th> </tr></thead>";
                            output=output+"<tbody>";
                            for(var i=0;i<count;i++)
                            {
                                output=output+"<form id=\"event"+result[i].eventid+"\" value=\"event"+result[i].eventid+"\" class=\"editeventform\" method=\"post\">";
                                output=output+"<tr>";
                                
                                output+="<input type='hidden' name='event' value='"+result[i].eventid+"'/>";    
                                output=output+"<td>"+result[i].eventname+"</td>";
                                output=output+"<td>"+result[i].eventdate+"</td>";
                                output=output+"<td>"+result[i].eventtime+"</td>";
                                output=output+"<td>"+result[i].eventplace+"</td>";
                                output=output+"<td>"+result[i].eventdescription+"</td>";
                                output=output+"<td><div onclick=\"gotoeditservlet("+result[i].eventid+")\" class=\"btn btn-info btn-mini eventeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                                output=output+"<td><div onclick=\"gotodeleteservlet("+result[i].eventid+")\"  class=\"btn btn-danger btn-mini eventdeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                                output=output+"</tr>";
                                output+output+"</form>";
                                
                            }
                            output=output+"</tbody>";  
                            output=output+"</table>";          
                            $("#viewallevents").html(output);
                        });
                    }else if(hashvalue=="#addgallerytype")
                    {
                        $("#contents").load("add-gallery-type.jsp");
                    }else if(hashvalue=="#addfacility")
                    {
                        $("#contents").load("add-facility.jsp");
                    }
                    else if(hashvalue=="#viewgallerytype")
                    {  
                        $("#contents").load("view-gallery-types.jsp");
                        $.post("../ViewGalleryTypeServlet",function(data){
                           
                            // alert("Data Got : " + data);
                            var result=$.parseJSON(data);//this converts string to json
                        
                            var count=countProperties(result);// this gives the count of the no of active events.
                            
                        
                            var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                            output=output+"<thead><tr><th>Name</th><th>Edit</th><th>Delete</th> </tr></thead>";
                            output=output+"<tbody>";
                            for(vari in result)
                            {
                                output=output+"<form id=\"gallerytype"+result[vari].GalleryTypeId+"\" value=\"gallerytype"+result[vari].GalleryTypeId+"\" class=\"editgallerytypeform\" method=\"post\">";
                                output=output+"<tr>";
                                
                                output+="<input type='hidden' name='gallerytype' value='"+result[vari].GalleryTypeId+"'/>";    
                                output=output+"<td>"+result[vari].GalleryTypeName+"</td>";
                                
                                //alert(result[vari].GalleryTypeId);
                                output=output+"<td><div onclick=\"gotoeditgallerytypeservlet("+result[vari].GalleryTypeId+")\" class=\"btn btn-info btn-mini gallerytypeeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                                output=output+"<td><div onclick=\"gotodeletegallerytypeservlet("+result[vari].GalleryTypeId+")\"  class=\"btn btn-danger btn-mini gallerytypedeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                                output=output+"</tr>";
                                output+output+"</form>";
                                
                            }
                            output=output+"</tbody>";  
                            output=output+"</table>";          
                            $("#viewgallerytypessection").html(output);
                        });
                    }else if(hashvalue=="#viewfacility")
                    {  
                       // alert("here");
                        $("#contents").load("view-facilities.jsp");
                        $.post("../ViewFacilitiesServlet",function(data){
                           
                            //alert("Data Got : " + data);
                            var result=$.parseJSON(data);//this converts string to json
                        
                            var count=countProperties(result);// this gives the count of the no of active events.
                           // alert("count"+count);
                        
                            var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                            output=output+"<thead><tr><th>Name</th><th>Description</th><th>Edit</th><th>Delete</th> </tr></thead>";
                            output=output+"<tbody>";
                            for(vari in result)
                            {
                                output=output+"<form id=\"facility"+result[vari].facilityid+"\" value=\"facility"+result[vari].facilityid+"\" class=\"editfacilityform\" method=\"post\">";
                                output=output+"<tr>";
                                
                                output+="<input type='hidden' name='facility' value='"+result[vari].facilityid+"'/>";    
                                output=output+"<td>"+result[vari].facilityname+"</td>";
                                output=output+"<td>"+result[vari].facilitydescription+"</td>";
                                
                                
                                alert(result[vari].facilityid);
                                output=output+"<td><div onclick=\"gotoeditfacilityservlet("+result[vari].facilityid+")\" class=\"btn btn-info btn-mini facilityeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                                output=output+"<td><div onclick=\"gotodeletefacilityservlet("+result[vari].facilityid+")\"  class=\"btn btn-danger btn-mini facilitydeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                                output=output+"</tr>";
                                output+output+"</form>";
                                
                            }
                            output=output+"</tbody>";  
                            output=output+"</table>";          
                            $("#viewfacilitysection").html(output);
                        });
                    }else if(hashvalue=="#addgallery")
                    {
                       // alert("addgallery");
                    
                        $("#contents").load("add-gallery.jsp");
                     
                        $.post("../GalleryGalleryTypeDisplayServlet",function(data){
                            // this add all the addons to the addon selector
                            var result=$.parseJSON(data);//this converts string to json
                           // alert("result"+result);
                            var count=countProperties(result);// this gives the count of the no of active events.
                           // alert("Count : "+count);
                            var output="<select name=\"GalleryTypes\">";
                            for(var i=0;i<count;i++)
                            {
                                output+="<option value=\""+result[i].GalleryTypeId+"\">"+result[i].GalleryTypeName+"</option>";
                            }
                            output+="</select>";
                        
                            $("#addgalleryselectgallerytype").html(output);
                        });
                    }else if(hashvalue=="#addnewmembership")
                    {
                        $("#contents").load("add-membership-type.jsp",function(d){
                        
                        });
                    }else if(hashvalue=="#viewmembershiptype")
                    {
                        $.post("../ViewMembershipType",function(data){
                            //  alert("data"+data);
                            $("#contents").html(data);
                        });
                    }
                }// end of window.location.hash
            
                
                
                
                
               
                
                $("#addgallery").click(function(){
                    $("#contents").load("add-gallery.jsp");
                     
                    $.post("../GalleryGalleryTypeDisplayServlet",function(data){
                        // this add all the addons to the addon selector
                        var result=$.parseJSON(data);//this converts string to json
                        //alert("result"+result);
                        var count=countProperties(result);// this gives the count of the no of active events.
                        //alert("Count : "+count);
                        var output="<select name=\"GalleryTypes\">";
                        for(var i=0;i<count;i++)
                        {
                            output+="<option value=\""+result[i].galleryTypeId+"\">"+result[i].galleryTypeName+"</option>";
                        }
                        output+="</select>";
                        
                        $("#addgalleryselectgallerytype").html(output);
                    });
                    
                });
                
                
                
                $("#addfacility").click(function(){
                    $("#contents").load("add-facility.jsp");
                });
                
                
                $("#viewfacility").click(function(){
                    //alert("click");
                    $("#contents").load("view-facilities.jsp");
                    
                    $.post("../ViewFacilitiesServlet",function(data){
                           
                        //alert("Data Got : " + data);
                        var result=$.parseJSON(data);//this converts string to json
                        
                        var count=countProperties(result);// this gives the count of the no of active events.
                        //alert("count"+count);
                        
                        var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                        output=output+"<thead><tr><th>Name</th><th>Description</th><th>Edit</th><th>Delete</th> </tr></thead>";
                        output=output+"<tbody>";
                        for(vari in result)
                        {
                            output=output+"<form id=\"facility"+result[vari].facilityid+"\" value=\"facility"+result[vari].facilityid+"\" class=\"editfacilityform\" method=\"post\">";
                            output=output+"<tr>";
                                
                            output+="<input type='hidden' name='facility' value='"+result[vari].facilityid+"'/>";    
                            output=output+"<td>"+result[vari].facilityname+"</td>";
                            output=output+"<td>"+result[vari].facilitydescription+"</td>";
                                
                                
                           // alert(result[vari].facilityid);
                            output=output+"<td><div onclick=\"gotoeditfacilityservlet("+result[vari].facilityid+")\" class=\"btn btn-info btn-mini facilityeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                            output=output+"<td><div onclick=\"gotodeletefacilityservlet("+result[vari].facilityid+")\"  class=\"btn btn-danger btn-mini facilitydeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                            output=output+"</tr>";
                            output+output+"</form>";
                                
                        }
                        output=output+"</tbody>";  
                        output=output+"</table>";          
                        $("#viewfacilitysection").html(output);
                    });
                });
                
                
                $("#editfacilitysavebutton").live("click",function(data){
                   // alert("editfacilitysavebutton");
                    var facilityid=document.getElementById("facility-id");
                    var facilityname=document.getElementById("facility-name");
                    var facilitydescription=document.getElementById("facility-description");
                    var activestatus=document.getElementById("facility-checkbox");
                    var datastring="facility-name="+facilityname.value+"&facility-id="+facilityid.value+"&facility-description="+facilitydescription.value+"&faciility-checkbox="+activestatus.checked;
                  //  alert("i am here");
                   // alert("datastring : "+datastring);
                    $.post("../EditFacilityServlet",datastring,function(){
                     //   alert("here1");
                    });
                });
                
                $("#editgallerytypesavebutton").live("click",function(data){
                    //alert("editgallerytypesavebutton");
                    var GalleryTypeId=document.getElementById("gallery-type-id");
                    var GalleryTypeName=document.getElementById("gallery-type-name");
                     
                    var datastring="gallery-type-name="+GalleryTypeName.value+"&gallery-type-id="+GalleryTypeId.value;
                    //alert("i am here");
                    // alert("datastring : "+datastring);
                    $.post("../EditGalleryTypeServlet",datastring,function(){
                        //   alert("here1");
                    });
                });// end of edit gallerytype save button
            
                
                $(".facilitydeletebutton").live("click",function(facility){
                    //alert("dude..!!");
                });  
                    
                 
                 
                $(".facilityeditbutton").live("click",function(facility){
                    
                    $("#contents").load("edit-facility.jsp");
                }); 
                    
                
                
                $("#addaddontype").click(function(){
                    $("#contents").load("add-addon-type.jsp");
                });
                
                $("#addAddontypeSaveButton").live("click",function(event){
                    // $("#contents").html(data);
                    event.preventDefault();
                    var addonname=document.getElementById("addon-type-name").value;
                    var addondesc=document.getElementById("addontypedescription").value;
                    var addontypecheckbox=document.getElementById("addontypecheckbox").checked;
                   
                    var datastring="addon-type-name="+addonname+"&description="+addondesc+"&Activestatus="+addontypecheckbox;
                    $.post("../AddAddonTypeServlet",datastring,function(data){
                       
                       
                        $("#addon-type-name").val("");
                        $("#addondescription").val("");
                    });
                   
                });//end of add addon save button
                
                
                $("#viewaddons").click(function(){
                    $.post("../ViewAddonServlet",function(data){
                        
                        $("#contents").html(data);
                    });
                });
                
                $("#addaddon").click(function(){
                    $.post("../FetchAddonTypeServlet",function(data){
                        
                        $("#contents").html(data);
                    });
                });//end of add addon 
                
                $("#addAddonSaveButton").live("click",function(event){
                    event.preventDefault();
                    var addontype=document.getElementById("addon-type-name").value;
                    var addonname=document.getElementById("addon-name").value;
                    var addonprice=document.getElementById("addon-price").value;
                    var addondesc=document.getElementById("addondescription").value;
                    var addoncheckbox=document.getElementById("addoncheckbox").checked;
                    
                    var datastring="addon-type-name="+addontype+"&addon-name="+addonname+"&addon-price="+addonprice+"&addondescription="+addondesc+"&addoncheckbox="+addoncheckbox;
                    
                    $.post("../AddNewAddonServlet",datastring,function(data){
                       // alert("data"+data);
                        $("#contents").html(data);
                        $("addon-name").val("");
                        $("addon-price").val("");
                        $("addondescription").val("");
                    });
                });//end of Add Addon Save Button
                
                $("#viewtyperooms").click(function(event){
                    $.post("../ViewRoomTypeServlet",function(data){
                       
                        $("#contents").html(data);
                    });
                });
                
                $("#viewrooms").click(function(event){
                    $.post("../ViewRoomServlet",function(data){
                      //  alert(data);
                        $("#contents").html(data);
                    });
                });
            
                // this function is not working
                $("#addroomtype").click(function(event){
                    
                    $.post("../FetchDetailsForAddRoomType",function(data){
                       // alert(data);
                        $("#contents").html(data);
                    });
                });
                
                
                $("#addgallerytype").click(function(){
                    $("#contents").load("add-gallery-type.jsp");
                });
                
                
                $("#addfacility").click(function(){
                    $("#contents").load("add-facility.jsp");
                });
                
                $("#editpolicysavebutton").live("click",function(data){
                    //alert("here");
                    var policyid=document.getElementById("policy-id");
                    var days=document.getElementById("days");
                    //var date=documen9t.getElementById("effective-date");
                    var ddate=document.getElementById("effective-date");
                    
                    var percentage=document.getElementById("percentage");
                    
                    var datastring="policyid="+policyid.value+"&days="+days.value+"&date="+ddate.value+"&percentage="+percentage.value;
                    alert("datastring : "+datastring)
                    
                    $.post("../EditCancellationPolicyServlet",datastring,function(){
                        // alert("here1");
                    });
                });
                
                $(".editcancellationpolicybutton").live("click",function(event){
                    $("#contents").load("edit-cancellation-policy.jsp");
                });
                
                $(".addcancellationpolicy").live("click",function(event){
                    $("#contents").load("add-cancellation-policy.jsp");
                });
                
                $("#viewgallerytypes").click(function(){
                    $("#contents").load("view-gallery-types.jsp");
                    $.post("../ViewGalleryTypeServlet",function(data){
                           
                        // alert("Data Got : " + data);
                        var result=$.parseJSON(data);//this converts string to json
                        
                        var count=countProperties(result);// this gives the count of the no of active events.
                            
                        
                        var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                        output=output+"<thead><tr><th>Name</th><th>Edit</th><th>Delete</th> </tr></thead>";
                        output=output+"<tbody>";
                        for(vari in result)
                        {
                            output=output+"<form id=\"gallerytype"+result[vari].GalleryTypeId+"\" value=\"gallerytype"+result[vari].GalleryTypeId+"\" class=\"editeventform\" method=\"post\">";
                            output=output+"<tr>";
                                
                            output+="<input type='hidden' name='gallerytype' value='"+result[vari].GalleryTypeId+"'/>";    
                            output=output+"<td>"+result[vari].GalleryTypeName+"</td>";
                                
                            // alert(result[vari].GalleryTypeId);
                            output=output+"<td><div onclick=\"gotoeditgallerytypeservlet("+result[vari].GalleryTypeId+")\" class=\"btn btn-info btn-mini gallerytypeeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                            output=output+"<td><div onclick=\"gotodeletegallerytypeservlet("+result[vari].GalleryTypeId+")\"  class=\"btn btn-danger btn-mini gallerytypedeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                            output=output+"</tr>";
                            output+output+"</form>";
                                
                        }
                        output=output+"</tbody>";  
                        output=output+"</table>";          
                        $("#viewgallerytypessection").html(output);
                    });
                });
            
                $("#addevent").click(function(){//loading add event
                    
                    $("#contents").load("add-event.jsp");
                    
                });
                
                $ ("#addeventsavebutton").live("click",function(data){//addeventbutton click
                    
                    var eventname=document.getElementById("event-name");
                    var eventdate=document.getElementById("event-date");
                    var eventtime=document.getElementById("event-time");
                    var noofecopasses=document.getElementById("eco-passes");
                    var ecoprice=document.getElementById("eco-price");
                    var noofvippasses=document.getElementById("vip-passes");
                    var vipprice=document.getElementById("vip-price");  
                    var eventvenue=document.getElementById("event-venue");
                    var eventdescription=document.getElementById("event-description");
                    var eventcheckbox=document.getElementById("event-checkbox");
                    var imagepath=document.getElementById("event-image");
                    
                    var datastring="event-name="+eventname.value+"&&event-date="+eventdate.value+"&&event-time="+eventtime.value+"&&eco-passes="+noofecopasses.value+"&&eco-price="+ecoprice.value+"&&vip-passes="+noofvippasses.value+"&&vip-price="+vipprice.value+"&&event-venue="+eventvenue.value+"&&event-description="+eventdescription.value+"&&event-checkbox="+eventcheckbox.checked+"&&event-image="+imagepath.value;
                    
                   // alert(datastring);
                    
                    $.post("../AddEventServlet",datastring,function(data){
                        
                        
                        datastring="event-image="+eventname.value+"_"+imagepath.value;
                    
                      
                      
                    document.addeventimagepath.action="ImageUploadServlet?imgname="+eventname.value+"_"+imagepath.value;
                    document.addeventimagepath.submit();
                    
                    alert("Your Event has been added.");
                    });
                    
                   // $("#contents").load("add-event.jsp",function(){
                     //   alert("Your event has been added");
                   // });
                      
                
                   
                });//end of add event save button
                
               
                
                $("#viewevent").click(function(){
                    
                    $("#contents").load("view-events.jsp");
                    $.post("../ViewEventServlet",function(data){
                        //alert("Data Got : " + data);
                        var result=$.parseJSON(data);//this converts string to json
                        
                        var count=countProperties(result);// this gives the count of the no of active events.
                        // alert("Count : "+count);
                        
                        var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                        output=output+"<thead><tr><th>Name</th><th>Date</th><th>Time</th><th>Venue</th><th>Description</th><th>Edit</th><th>Delete</th> </tr></thead>";
                        output=output+"<tbody>";
                        for(var i=0;i<count;i++)
                        {
                            output=output+"<form id=\"event"+result[i].eventid+"\" value=\"event"+result[i].eventid+"\" class=\"editeventform\" method=\"post\">";
                            output=output+"<tr>";
                                
                            output+="<input type='hidden' name='event' value='"+result[i].eventid+"'/>";    
                            output=output+"<td>"+result[i].eventname+"</td>";
                            output=output+"<td>"+result[i].eventdate+"</td>";
                            output=output+"<td>"+result[i].eventtime+"</td>";
                            output=output+"<td>"+result[i].eventplace+"</td>";
                            output=output+"<td>"+result[i].eventdescription+"</td>";
                            output=output+"<td><div onclick=\"gotoeditservlet("+result[i].eventid+")\" class=\"btn btn-info btn-mini eventeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                            output=output+"<td><div onclick=\"gotodeleteservlet("+result[i].eventid+")\"  class=\"btn btn-danger btn-mini eventdeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                            output=output+"</tr>";
                            output+output+"</form>";
                                
                        }
                        output=output+"</tbody>";  
                        output=output+"</table>";
                        
                        //output=output+"<input type=\"button\" value=\"click\" id=\"eventeditbutton\"/>";
                        
                     
                        $("#viewallevents").html(output);
                        
                        
                        
                    });
                    
                    
                });//e nd of view event
                
                $("#editeventsavebutton").live("click",function(data){
                    
                    var eventid=document.getElementById("event-id");
                    var eventname=document.getElementById("event-name");
                    var eventdate=document.getElementById("event-date");
                    var eventtime=document.getElementById("event-time");
                    var noofecopasses=document.getElementById("eco-passes");
                    var ecoprice=document.getElementById("eco-price");
                    var noofvippasses=document.getElementById("vip-passes");
                    var vipprice=document.getElementById("vip-price");  
                    var eventvenue=document.getElementById("event-venue");
                    var eventdescription=document.getElementById("event-description");
                    var eventcheckbox=document.getElementById("event-checkbox");//alert(eventcheckbox.checked);
                    //var imagepath=document.getElementById("event-image");
                    
                    var datastring="event-name=\""+eventname.value+"\"&&event-date="+eventdate.value+"&&event-time="+eventtime.value+"&&eco-passes="+noofecopasses.value+"&&eco-price="+ecoprice.value+"&&vip-passes="+noofvippasses.value+"&&vip-price="+vipprice.value+"&&event-venue="+eventvenue.value+"&&event-description=\""+eventdescription.value+"\"&&event-checkbox="+eventcheckbox.checked+"&&event-id="+eventid.value;
                    //alert("datastring : "+datastring)
                    
                    $.post("EditEventServlet",datastring,function(){
                        // alert("here1");
                        $("#contents").load("add-event.jsp",function(){});
                    });
                });// end of edit event save button
                
                
                
                
                $("#editgallerytypesavebutton").live("click",function(data){
                    //alert("editgallerytypesavebutton");
                    var GalleryTypeId=document.getElementById("gallery-type-id");
                    var GalleryTypeName=document.getElementById("gallery-type-name");
                     
                    var datastring="gallery-type-name="+GalleryTypeName.value+"&gallery-type-id="+GalleryTypeId.value;
                    //alert("i am here");
                    // alert("datastring : "+datastring);
                    $.post("../EditGalleryTypeServlet",datastring,function(){
                        //   alert("here1");
                    });
                });// end of edit gallerytype save button
                
                
                
                
                $(".gallerytypedeletebutton").live("click",function(gallerytype){
                    //alert("dude..!!");
                });             
                 
                    
                $(".gallerytypeeditbutton").live("click",function(gallerytype){
                    
                    $("#contents").load("edit-gallerytype.jsp");
                }); 
                    
                $(".eventeditbutton").live("click",function(event){
                    $("#contents").load("edit-event.jsp");
                }); 
                
                $(".eventdeletebutton").live("click",function(event){
                    //alert("dude..!!");
                });             
               
                
                $("#addpackage").click(function(event){
                    $("#contents").load("add-package.jsp #addpackagesection", function(d){
                        $.post("PackageAddonDisplayServlet",function(data){
                            // this add all the addons to the addon selector
                            var result=$.parseJSON(data);//this converts string to json
                        
                            var count=countProperties(result);// this gives the count of the no of active events.
                        
                            var output="<select multiple=\"multiple\" name=\"facilities\">";
                            for(var i=0;i<count;i++)
                            {
                                output+="<option value=\""+result[i].AddonId+"\">"+result[i].AddonName+"</option>";
                            }
                            output+="</select>";
                            //alert("im here"+output);
                            $("#addpackageselectaddons").html(output);
                        });
                        event.stopPropagation();
                    
                        $.post("PackageRoomtypeDisplay",function(data){
                        
                            var result=$.parseJSON(data);//this converts string to json
                            // var result=data;
                            //alert ("result : "+result);
                            var count=countProperties(result);// this gives the count of the no of active events.
                            // alert("Count : "+count);
                            
                            var output="<select name=\"Roomtype\" id=\"Roomtype\" class=\"input-large margin-r-20\">";
                            for(var i=0;i<count;i++)
                            {
                                output+="<option value=\""+result[i].roomtypeid+"\">"+result[i].roomtype+"</option>";
                            }
                            output+="</select>";
                            //alert("output"+output);
                            $("#addpackagesroomtypeselection").html(output);
                            var output1="<select name=\"Roomtype1\" id=\"Roomtype1\" class=\"input-large margin-r-20\">";
                            for(var i=0;i<count;i++)
                            {
                                output1+="<option value=\""+result[i].roomtypeid+"\">"+result[i].roomtype+"</option>";
                            }
                            output1+="</select>";
                            $("#addpackagesroomtypeselection1").html(output1);
                        });
                        event.stopPropagation();
                    });
                    
                    
                    
                });//end of ad package
                
                $("#addpackagesavebutton").live("click",function(event){
                    //event.preventDefault();
                    
                    var roomtype=document.getElementById("Roomtype").value;
                    var roomtype1=document.getElementById("Roomtype1").value;
                    if(roomtype==roomtype1)
                    {
                        alert("Room type cant be the same"); return;
                    }
                    //var packagename=getElementById("package-name");
                
                    // $("#addpackagepage").submit(function(event){
                    
                    var eventid=document.getElementById("event-id");
                    
                    var packname=document.getElementById("package-name").value;
                    var startdate=document.getElementById("start-date").value;
                    var enddate=document.getElementById("end-date").value;
                    var idealsize=document.getElementById("ideal-size").value;
                    var packprice=document.getElementById("package-price").value;
                    var packduration=document.getElementById("package-duration").value;
                    var addonarray=new Array();var c=0;
                        
                    for(var x=0;x<document.forms.addpackagepage.facilities.length;x++)
                    {
                        if(document.forms.addpackagepage.facilities[x].selected)
                        {
                            addonarray[c]=document.forms.addpackagepage.facilities[x].value;alert(""+addonarray[c]);
                            c++;
                        }
                    }
            
                    //var roomtype=document.getElementById("Roomtype").value;
                    //var roomtype1=document.getElementById("Roomtype1").value;
                    var noofroom=document.getElementById("noofrooms").value;
                    var noofroom1=document.getElementById("noofrooms1").value;
                    var packdesc=document.getElementById("package-description").value;
                    var addpackcheckbox=document.getElementById("addpackagecheckbox").checked;
                      
                    var datastring="package-name=\""+packname+"\"&start-date="+startdate+"&end-date="+enddate+"&ideal-size="+idealsize+"&package-price="+packprice+"&package-duration="+packduration+"&RoomType="+roomtype+"&RoomType1="+roomtype1+"&noofrooms="+noofroom+"&noofrooms1="+noofroom1+"&package-checkbox="+addpackcheckbox;
                    for(var i=0;i<c;i++)
                    {
                        datastring+="&facilities"+i+"="+addonarray[i];
                    }
                         
                    datastring+="&count="+c;
                   // alert(datastring);
                     
                    $.post("../AddPackageServlet",datastring,function(data){
                      
                    });//end of add package servlet
                  
                
                });//end of add package save button
           
           
                $("#viewcancellationpolicy").click(function(){
                    if($("#contents").find("#viewcancellationpolicysection").length <= 0)
                        $("#contents").load("view-cancellation-policy.jsp #viewcancellationpolicysection");
                    $.post("../ViewCancellationPolicy",function(data){
                        // alert("data"+data);
                        //console.log(data);
                        var result=$.parseJSON(data);
                        var count=countProperties(result);// this gives the count of the no of active events.
                        // alert("Count : "+count);
                        
                        var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                        output=output+"<thead><tr><th>#</th><th>Days</th><th>Percentage</th><th>Policy Effective From</th><th>Edit</th><th>Delete</th> </tr></thead>";
                        output=output+"<tbody>";
                        for(var i=0;i<count;i++)
                        {
                            output=output+"<form id=\"event"+result[i].eventid+"\" value=\"event"+result[i].eventid+"\" class=\"editeventform\" method=\"post\">";
                            output=output+"<tr>";
                                
                            output+="<input type='hidden' name='event' value='"+result[i].id+"'/>";    
                            output=output+"<td>"+result[i].id+"</td>";
                            output=output+"<td>"+result[i].days+"</td>";
                            output=output+"<td>"+result[i].percentage+"</td>";
                            output=output+"<td>"+result[i].date+"</td>";
                            
                            output=output+"<td><div onclick=\"editcancellationpolicyservlet("+result[i].id+")\" class=\"btn btn-info btn-mini editcancellationpolicybutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                            output=output+"<td><div onclick=\"deletecancellationpolicyservlet("+result[i].id+")\"  class=\"btn btn-danger btn-mini deletecancellationpolicyservlet\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                            output=output+"</tr>";
                            output+output+"</form>";
                                
                        }
                        output=output+"</tbody>";  
                        output=output+"</table>";
                        
                        //output=output+"<input type=\"button\" value=\"click\" id=\"eventeditbutton\"/>";
                        
                        //console.log(output);
                        $("#viewcancellationtable").html(output);
                        
                        
                    });
                });
          
          
                $("#addcancellationpolicy").click(function(){
                    //alert("happy");
                    $("#contents").load("add-cancellation-policy.jsp");
                    
                });
                
                $ ("#savecancellationpolicy").live("click",function(data){
                    
                   // alert("here");
                    var days=document.getElementById("days");
                   // alert("days");
                    var date=document.getElementById("effective-date");
                   // alert("date");
                    var percentage=document.getElementById("percentage");                     
                   // alert("percentage");
                    datastring="days="+days.value+"&date="+date.value+"&percentage="+percentage.value;
                   // alert(datastring);
                    $.post("../AddCancellationPolicyServlet",datastring,function(){
                       // alert("Done!!");
                      
                    });
                   
                });
                
                $("#addnewmembership").click(function(event){
                    event.preventDefault();
                    $("#contents").load("add-membership-type.jsp",function(d){
                        
                    });
                });
                
                $("#addmembershiptypesavebutton").live("click",function(event){
                    var membershiptypename=document.getElementById("membership-type-name").value;
                    var membershipfees=document.getElementById("membership-fees").value;
                    var membershiptime=document.getElementById("membership-time").value;
                    var discount=document.getElementById("discount").value;
                    var desc=document.getElementById("description").value;
                    var checkbox=document.getElementById("status").value;
                    
                    var datastring="membership-type-name="+membershiptypename+"&membership-fees="+membershipfees+"&membership-time="+membershiptime+"&discount="+discount+"&description="+desc+"&status="+checkbox;
                    event.preventDefault();
                    $.post("membershiptype",datastring,function(data){
                       // alert("data"+data);
                        $("#contents").html(data);
                        $("#membership-type-name").val("");
                        $("#membership-fees").val("");
                        $("#membership-time").val("");
                        $("#discount").val("");
                        $("#status").val("");
                        
                    });
                });
                
                $("#viewmembershiptype").click(function(event){
                    
                    $.post("../ViewMembershipType",function(data){
                        //  alert("data"+data);
                        $("#contents").html(data);
                    });
                    
                });//end of view membership
           
            });//end of document .ready
            
            function editcancellationpolicyservlet(id)
            {
                $("#contents").load("edit-cancellation-policy.jsp #editcancellationpolicy");
                var datastring="policy="+id;
               // alert(datastring);
                $.post("../SelectEditCancellationServlet",datastring,function(data){
                    var result=$.parseJSON(data);//this converts string to json
                    $("#policy-id").val(""+result.id);
                    $("#days").val(""+result.days);
                    $("#percentage").val(""+result.percentage);
                    $("#effective-date").val(""+result.date);
                });
            }
 
            function gotoeditservlet(id)
            {
                $("#contents").load("edit-event.jsp #editeventsection");
                var datastring="event="+id;
                $.post("../SelectEditEventServlet",datastring,function(data){
                    var result=$.parseJSON(data);//this converts string to json
                   // alert(result.eventname);
                    $("#event-id").val(""+result.eventid);
                    $("#event-name").val(""+result.eventname);
                    $("#event-date").val(""+result.eventdate);
                    $("#event-time").val(""+result.eventtime);
                    $("#eco-passes").val(""+result.totalecopass);
                    $("#eco-price").val(""+result.ecopassprice);
                    $("#event-venue").val(""+result.eventplace);
                    $("#vip-passes").val(""+result.totalvippass);
                    $("#vip-price").val(""+result.vippassprice);alert(result.eventdescription);
                    //$("#event-image").val(result.imagepath);
                    
                    $("#event-description").val(""+result.eventdescription);
                });
            }
            
            
            function deletecancellationpolicyservlet(id)
            {
                var answer=confirm("Are you sure you want to delete ?");
                if(answer)
                {
                    var datastring="policy="+id;
                    $.post("../DeleteCancellationPolicyServlet",datastring,function(data){
                            
                        if(data)
                        {
                            
                            $("#contents").load("view-cancellation-policy.jsp");
                            
                            $.post("../ViewCancellationPolicy",function(data){
                               // alert("Data Got : " + data);
                                var result=$.parseJSON(data);//this converts string to json
                        
                                var count=countProperties(result);// this gives the count of the no of active events.
                                //alert("Count : "+count);
                        
                                var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                                output=output+"<thead><tr><th>#</th><th>NoOfDays</th><th>Percentage</th><th>Date</th><th>Edit</th><th>Delete</th> </tr></thead>";
                                output=output+"<tbody>";
                                for(var i=0;i<count;i++)
                                {
                                    output=output+"<form id=\"event"+result[i].id+"\" value=\"event"+result[i].id+"\" class=\"editeventform\" method=\"post\">";
                                    output=output+"<tr>";
                                
                                    output+="<input type='hidden' name='event' value='"+result[i].id+"'/>";    
                                    output=output+"<td>"+result[i].id+"</td>";
                                    output=output+"<td>"+result[i].days+"</td>";
                                    output=output+"<td>"+result[i].percentage+"</td>";
                                    output=output+"<td>"+result[i].date+"</td>";
                                    
                                    output=output+"<td><div onclick=\"editcancellationpolicyservlet("+result[i].id+")\" class=\"btn btn-info btn-mini eventeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                                    output=output+"<td><div onclick=\"deletecancellationpolicyservlet("+result[i].id+")\"  class=\"btn btn-danger btn-mini eventdeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                                    output=output+"</tr>";
                                    output+output+"</form>";
                                
                                }
                                output=output+"</tbody>";  
                                output=output+"</table>";
                        
                                //output=output+"<input type=\"button\" value=\"click\" id=\"eventeditbutton\"/>";
                        
                     
                                $("#viewallevents").html(output);
                        
                        
                            });
                        }
                    });
                        
                }
            }
            
            
            function gotoeditgallerytypeservlet(id)
            {
                $("#contents").load("edit-gallery-type.jsp #editgallerytypesection");
                var datastring="gallerytype="+id;
               // alert(datastring);
                $.post("../SelectEditGalleryTypeServlet",datastring,function(data){
                   // alert("here");
                    var result=$.parseJSON(data);//this converts string to json
                    //alert(data);
                    $("#gallery-type-id").val(""+result.GalleryTypeId);
                    $("#gallery-type-name").val(""+result.GalleryTypeName);
                    
                });
            }
            
            
            
            
            function gotodeleteservlet(id)
            {
                var answer=confirm("Are you sure you want to delete ?");
                if(answer)
                {
                    var datastring="event="+id;
                    $.post("../DeleteEventServlet",datastring,function(data){
                          
                        if(data)
                        {
                            $("#contents").load("view-events.jsp");
                            $.post("ViewEventServlet",function(data){
                               // alert("Data Got : " + data);
                                var result=$.parseJSON(data);//this converts string to json
                        
                                var count=countProperties(result);// this gives the count of the no of active events.
                               // alert("Count : "+count);
                        
                                var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                                output=output+"<thead><tr><th>Name</th><th>Date</th><th>Time</th><th>Venue</th><th>Description</th><th>Edit</th><th>Delete</th> </tr></thead>";
                                output=output+"<tbody>";
                                for(var i=0;i<count;i++)
                                {
                                    output=output+"<form id=\"event"+result[i].eventid+"\" value=\"event"+result[i].eventid+"\" class=\"editeventform\" method=\"post\">";
                                    output=output+"<tr>";
                                
                                    output+="<input type='hidden' name='event' value='"+result[i].eventid+"'/>";    
                                    output=output+"<td>"+result[i].eventname+"</td>";
                                    output=output+"<td>"+result[i].eventdate+"</td>";
                                    output=output+"<td>"+result[i].eventtime+"</td>";
                                    output=output+"<td>"+result[i].eventplace+"</td>";
                                    output=output+"<td>"+result[i].eventdescription+"</td>";
                                    output=output+"<td><div onclick=\"gotoeditservlet("+result[i].eventid+")\" class=\"btn btn-info btn-mini eventeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                                    output=output+"<td><div onclick=\"gotodeleteservlet("+result[i].eventid+")\"  class=\"btn btn-danger btn-mini eventdeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                                    output=output+"</tr>";
                                    output+output+"</form>";
                                
                                }
                                output=output+"</tbody>";  
                                output=output+"</table>";
                        
                                //output=output+"<input type=\"button\" value=\"click\" id=\"eventeditbutton\"/>";
                        
                     
                                $("#viewallevents").html(output);
                        
                        
                            });
                        }
                    });
                        
                }
            }
            
            
            /* function setimagename(formid)
            {
                
                formid.action="ImageUploadServlet?imgname=janice";
                document.addeventimagepath.submit();
       
            }*/
            
            
            
            
            function gotodeletefacilityservlet(id)
            {
                var answer=confirm("Are you sure you want to delete ?");
                if(answer)
                {
                    var datastring="facility="+id;
                    $.post("../DeleteFacilityServlet",datastring,function(data){
                          
                        if(data)
                        {
                            $("#contents").load("view-facilities.jsp");
                            $.post("../ViewFacilitiesServlet",function(data){
                           
                               // alert("Data Got : " + data);
                                var result=$.parseJSON(data);//this converts string to json
                        
                                var count=countProperties(result);// this gives the count of the no of active events.
                                //alert("count"+count);
                        
                                var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                                output=output+"<thead><tr><th>Name</th><th>Description</th><th>Edit</th><th>Delete</th> </tr></thead>";
                                output=output+"<tbody>";
                                for(vari in result)
                                {
                                    output=output+"<form id=\"facility"+result[vari].facilityid+"\" value=\"facility"+result[vari].facilityid+"\" class=\"editfacilityform\" method=\"post\">";
                                    output=output+"<tr>";
                                
                                    output+="<input type='hidden' name='facility' value='"+result[vari].facilityid+"'/>";    
                                    output=output+"<td>"+result[vari].facilityname+"</td>";
                                    output=output+"<td>"+result[vari].facilitydescription+"</td>";
                                
                                
                                  //  alert(result[vari].facilityid);
                                    output=output+"<td><div onclick=\"gotoeditfacilityservlet("+result[vari].facilityid+")\" class=\"btn btn-info btn-mini facilityeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                                    output=output+"<td><div onclick=\"gotodeletefacilityservlet("+result[vari].facilityid+")\"  class=\"btn btn-danger btn-mini facilitydeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                                    output=output+"</tr>";
                                    output+output+"</form>";
                                
                                }
                                output=output+"</tbody>";  
                                output=output+"</table>";          
                                $("#viewfacilitysection").html(output);
                            });
                        }
                    });
                        
                }
            }
            
            
            function gotoeditfacilityservlet(id)
            {
               // alert("editfacility");
                $("#contents").load("edit-facility.jsp #editfacilitysection");
                var datastring="facility="+id;
               // alert(datastring);
                $.post("../SelectEditFacilityServlet",datastring,function(data){
                  //  alert("data"+data);
                    var result=$.parseJSON(data);//this converts string to json
                   // alert(result.facilityid+" "+result.facilityname+ " "+result.facilitydescription+" "+result.activestatus);
                    $("#facility-id").val(""+result.facilityid);
                    $("#facility-name").val(""+result.facilityname);
                    //$("#event-image").val(result.imagepath);
                    
                    $("#facility-description").val(""+result.facilitydescription);
                    $("#facility-checkbox").val(""+result.activestatus);
                    
                });
            }
            
           
            function gotodeletegallerytypeservlet(id)
            {
                var answer=confirm("Are you sure you want to delete ?");
                if(answer)
                {
                    var datastring="gallerytype="+id;
                    //  alert("datastring"+datastring);
                    $.post("../DeleteGalleryTypeServlet",datastring,function(data){
                        // alert("here");  
                        if(data)
                        {
                            $("#contents").load("view-gallery-types.jsp");
                            $.post("../ViewGalleryTypeServlet",function(data){
                           
                                // alert("Data Got : " + data);
                                var result=$.parseJSON(data);//this converts string to json
                        
                                var count=countProperties(result);// this gives the count of the no of active events.
                            
                        
                                var output="<table class=\"table table-bordered white\">";// this is the final full table string to b crated and appended in the div
                                output=output+"<thead><tr><th>Name</th><th>Edit</th><th>Delete</th> </tr></thead>";
                                output=output+"<tbody>";
                                for(vari in result)
                                {
                                    output=output+"<form id=\"gallerytype"+result[vari].GalleryTypeId+"\" value=\"gallerytype"+result[vari].GalleryTypeId+"\" class=\"editeventform\" method=\"post\">";
                                    output=output+"<tr>";
                                
                                    output+="<input type='hidden' name='gallerytype' value='"+result[vari].GalleryTypeId+"'/>";    
                                    output=output+"<td>"+result[vari].GalleryTypeName+"</td>";
                                
                                    //alert(result[vari].GalleryTypeId);
                                    output=output+"<td><div onclick=\"gotoeditgallerytypeservlet("+result[vari].GalleryTypeId+")\" class=\"btn btn-info btn-mini gallerytypeeditbutton\"><i class=\"icon-edit icon-white\"></i> Edit</div></td>";
                                    output=output+"<td><div onclick=\"gotodeletegallerytypeservlet("+result[vari].GalleryTypeId+")\"  class=\"btn btn-danger btn-mini gallerytypedeletebutton\"><i class=\"icon-trash icon-white\"></i> Delete</div></td>";
                                
                                    output=output+"</tr>";
                                    output+output+"</form>";
                                
                                }
                                output=output+"</tbody>";  
                                output=output+"</table>";          
                                $("#viewgallerytypessection").html(output);
                            });
                        }
                    });
                
            
            
                }
            }
            
            function editaddontype(id)
            {
               
                var datastring="id="+id;alert("here :"+datastring);
                $.post("../EditAddonTypeServlet",datastring,function(data){
                  //  alert("data"+data);
                    $("#contents").html(data);
                });
            }
           
            function deleteaddontype(id)
            {
               
                var datastring="id="+id;alert("here :"+datastring);
                $.post("../DeleteAddonTypeServlet",datastring,function(data){
                    //alert("data"+data);
                    $("#contents").html(data);
                });
            }
           
           
           
            
        </script>
    </head>
    <body>

        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="#">Prime Resort</a>
                    <div class="nav-collapse collapse">
                        <ul class="nav">
                            <li class="active"><a href="home.jsp">Home</a></li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Room <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="#addroomtype" id="addroomtype">Add New Room Type</a></li>
                                    <li><a href="#viewtyperooms" id="viewtyperooms">View Types of Rooms</a></li>
                                    <li><a href="#viewrooms" id="viewrooms">View Rooms</a></li>
                                    <li class="divider"></li>
                                    <li><a href="#addfacility" id="addfacility">Add New Facility</a></li>
                                    <li><a href="#viewfacility" id="viewfacility">View Facilities</a></li>

                                </ul>
                            </li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Addon <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="#addaddontype" id="addaddontype">Add New Addon Type</a></li>
                                    <li><a href="#viewaddontypes" id="viewaddontype">View Addon Types</a></li>
                                    <li class="divider"></li>
                                    <li><a href="#addaddon" id="addaddon">Add new Addon</a></li>
                                    <li><a href="#viewaddons" id="viewaddons">View Addons</a></li>
                                </ul>
                            </li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Membership <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="#addnewmembership" id="addnewmembership">Add new Membership Type</a></li>
                                    <li><a href="#viewmembershiptype" id="viewmembershiptype">View Membership Types</a></li>
                                </ul>
                            </li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Package <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="#addpackage" id="addpackage">Add new Package</a></li>
                                    <li><a href="view-packages.jsp">View Packages</a></li>
                                </ul>
                            </li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Event <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="#addevent" id="addevent">Add new Event</a></li>
                                    <li><a href="#viewevent" id="viewevent">View Events</a></li>
                                </ul>
                            </li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cancellation <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
                                    <li class="divider"></li>
                                    <li><a href="#viewcancellationpolicy" id="viewcancellationpolicy">View Cancellation Policy</a></li>
                                    <li><a href="#addcancellationpolicy" id="addcancellationpolicy">Add Cancellation Policy</a></li>
                                </ul>
                            </li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">User <b class="caret"></b></a>
                                <ul class="dropdown-menu">

                                    <li class="dropdown-submenu">
                                        <a href="#">Admin User</a>
                                        <ul class="dropdown-menu">
                                            <li><a href="add-admin-user.html">Add new Admin User</a></li>
                                            <li><a href="view-admin-users.html">View Admin users</a></li>
                                        </ul>
                                    </li>
                                    <li class="dropdown-submenu">
                                        <a href="#">Registered User</a>
                                        <ul class="dropdown-menu">
                                            <li><a href="add-registered-user.html">Register New User</a></li>
                                            <li><a href="view-registered-users.html">View Regstered Users</a></li>
                                        </ul>
                                    </li>

                                </ul>
                            </li>

                           <!-- <li><a href="send-email.html">Email</a></li>-->

                         <!--   <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Report <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="#">Membership</a></li>
                                    <li><a href="#">Events</a></li>
                                    <li><a href="#">Bookings</a></li>
                                    <li><a href="#">Others</a></li>
                                </ul>
                            </li>-->

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Gallery <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="#addgallerytype" id="addgallerytype"> Add New Gallery Type</a></li>
                                    <li><a href="#viewgallerytype" id="viewgallerytypes">View Gallery Types</a></li>
                                    <li class="divider"></li>
                                    <li><a href="#addgallery" id="addgallery"> Add New Gallery</a></li>
                                    <li><a href="#viewgallerytype" id="viewgallerytypes">View Galleries</a></li>

                                </ul>
                            </li>

                            <li class="dropdown">

                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Profile <b class="caret"></b></a>
                                <ul class="dropdown-menu">

                                    <li><a href="edit-profile.html">Edit Profile</a></li>
                                    <li><a href="change-password.html">Change Password</a></li>

                                    <li><a href="#"><span class="label label-important">Logout</span></a></li>

                                </ul>
                            </li>

                        </ul>

                    </div><!--/.nav-collapse -->
                </div>
            </div>
        </div>

        <div class="container">

            <div class="contents" id="contents">
                <legend> Admin Dashboard</legend>

            </div>



            <hr>

            <footer>
                <p>&copy; The Prime Resort, 2012</p>
            </footer>

        </div> <!-- /container -->

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.1.min.js"><\/script>')</script>

        <script src="js/vendor/bootstrap.min.js"></script>

        <script src="js/main.js"></script>


    </body>


</html>
